package com.zhuang.convert.model;

import java.util.List;

/**
 * Created by zhuanglei on 15/4/26.
 */
public class TableColumns {

    private String tableName;

    private List<String> columns;

    public TableColumns(String tableName, List<String> columns) {
        this.tableName = tableName;
        this.columns = columns;
    }

    public TableColumns() {

    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public List<String> getColumns() {
        return columns;
    }

    public void setColumns(List<String> columns) {
        this.columns = columns;
    }

    public String getColumnStr(){
        String result = "";
        for (String column : this.columns) {
            result += column + ",";
        }

        if (result.length() > 0){
            result = result.substring(0,result.length() -1 );
        }

        return result;

    }
}
